//
//  SEGPublishHouseTagViewModel.h
//  Commom
//
//  Created by 梁学彰 on 2020/6/4.
//

#import <Foundation/Foundation.h>
#if __has_include(<Commom/CommomHeader.h>)
#import <Commom/CommomHeader.h>
#else
#import "CommomHeader.h"
#endif


NS_ASSUME_NONNULL_BEGIN
#define kPublishHouseTagViewHeight 44     // PublishHouseTagView的高度

extern NSString * const SEGPublishHouseTagViewCellIndetifier;
typedef NS_ENUM(NSUInteger, SEGEnumPublishHouseTagViewType) {
    SEGEnumPublishHouseTagViewType_NO = 0, /*默认*/
};

@interface SEGPublishHouseTagViewModel : NSObject
@property (nonatomic, copy) NSString *title; // <#注释#>
@property (nonatomic, assign) CGFloat widgetWidth;//控件宽度
@property (nonatomic, assign) CGFloat widgetHeight;//控件高度
@property (nonatomic, strong)id businessData;//控件业务数据载体
@property (nonatomic, strong) NSArray<NSDictionary*> *tags;

-(instancetype)init;
@end

@interface SEGPublishHouseTagViewLayout : NSObject
@property (nonatomic, assign,readonly) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign,readonly) CGFloat tagsTotalHeight;
@property (nonatomic, assign,readonly) SEGEnumPublishHouseTagViewType type;//控件类型
@property (nonatomic, strong,readonly)SEGPublishHouseTagViewModel *data;
- (instancetype)initWithData:(SEGPublishHouseTagViewModel *)data type:(SEGEnumPublishHouseTagViewType)type;
-(void)segPublishHouseTagViewLayout;
-(void)refreshTagWithArray:(NSArray <NSDictionary *>*)tagArray;

@property (nonatomic, assign) CGFloat titleLabelHeight;//titleLabel 高度
@property (nonatomic, strong) SEGTextLayout *titleLabelTextLayout;//titleLabel 富文本布局

@property (nonatomic, strong)NSArray<NSDictionary*> *tagsData;
@end


NS_ASSUME_NONNULL_END
